package cn.com.zcode.dic.control;

import java.util.List;

import cn.com.zcode.core.cache.ApplicationCacheAware;
import cn.com.zcode.dic.model.Dictionary;
import cn.com.zcode.dic.service.DictionaryService;

public class GlobalDictionaryInit implements ApplicationCacheAware {
	private DictionaryService dictionaryService;

	public void load(ApplicationCache manager) {
		System.out.println("初始化全局数据......");
		List<Dictionary> dics = dictionaryService.findInitDictionary();
		for (Dictionary dictionary : dics) {
			manager.addDictionary(dictionary);
		}
	}

	public DictionaryService getDictionaryService() {
		return dictionaryService;
	}

	public void setDictionaryService(DictionaryService dictionaryService) {
		this.dictionaryService = dictionaryService;
	}
	

}
